{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "7bf5328e",
   "metadata": {},
   "outputs": [],
   "source": [
    "from total_plot import plot_it\n",
    "import numpy as np\n",
    "\n",
    "x_labels = [20, 60, 100, 140, 180]\n",
    "idx_ratio = [10000/760, 10000/7080, 10000/19800, 10000/38920, 10000/64440]\n",
    "idx_ratio_1 = [1/380, 1/3540, 1/9900, 1/19460, 1/32220]\n",
    "optimal_ratio = [\n",
    "    0.608,\n",
    "    0.639815542,\n",
    "    0.529934688,\n",
    "    0.507276783,\n",
    "    0.517276783,]\n",
    "optimal_ratio_1 = [\n",
    "    0.80615942,\n",
    "    0.808815366,\n",
    "    0.814321069,\n",
    "    0.826818555,\n",
    "    0.806818555]\n",
    "swap_vals = np.array([\n",
    "    [3058/2, 0],\n",
    "    [29278/2, 0],\n",
    "    [105978/2, 0],\n",
    "    [268872/2, 0],\n",
    "    [637876/2, 0],\n",
    "])\n",
    "greedy_vals = np.array([\n",
    "    [996-380, 6528],\n",
    "    [9804-3540, 60980],\n",
    "    [33818-9900, 183080],\n",
    "    [79922-19460, 395602],\n",
    "    [153332-32220, 841218],\n",
    "])\n",
    "optimal_vals = np.array([\n",
    "    [996-380, 6528-380],\n",
    "    [9804-3540, 60980-3540],\n",
    "    [33818-9900, 183080-9900],\n",
    "    [79922-19460, 395602-19460],\n",
    "    [153332-32220, 841218-32220],\n",
    "])\n",
    "colors = ['#436691', '#f7d27d', '#da695c']  # 分别对应 swap, greedy, optimal 的颜色\n",
    "border_colors = ['#436691', '#f7d27d', '#da695c']  # 分别对应 swap, greedy, optimal 的颜色\n",
    "plot_it(swap_vals, greedy_vals, optimal_vals, idx_ratio_1, optimal_ratio, optimal_ratio_1, x_labels, colors, border_colors, 'fig/qubit_num_qft.pdf')"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "xs",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.16"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
